package admin

import (
	"mycms/global"
	"mycms/model/system"
)

func GetApis(id uint) (err error, createData []uint) {
	var apis []system.MenuApis
	err = global.DB.Where("menu_id = ?", id).Find(&apis).Error

	for _, v := range apis{
		createData = append(createData, v.ApiId)
	}

	return err, createData
}
